package com.design.patterns.structuralModel.chainofresponsibility.service;

import com.design.patterns.structuralModel.chainofresponsibility.bean.Request;

public interface Middleware {
    /**
     * 将责任对象放置在责任链中
     * @param next
     * @return
     */
    public Middleware linkWith(Middleware next);
    /**
     * 具体处理事件的方法,将事件的实体传入进去
     */
    public boolean check(Request request);
    /**
     * 将数据传入下一个对象进行处理
     */
    public boolean checkNext(Request request);
}
